<?php
use common\service\StaticService;
use common\service\GlobalUrlService;
use backend\assets\AdminAsset;
use common\service\CommonService;


StaticService::includeAppJsStatic(GlobalUrlService::buildStaticUrl('/backend/withdraw/info.js'),AdminAsset::class);
?>

<form class="layui-form">
    <div class="layui-card">
        <div class="layui-card-header">提现查看</div>
        <div class="layui-card-body">
            <div class="layui-form-item">
                <label class="layui-form-label">提现订单号</label>
                <label class="layui-form-label label-left"><?=$row['withdraw_no']?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">店铺id</label>
                <label class="layui-form-label label-left"><?=$row['shop_id']?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">店铺名称</label>
                <label class="layui-form-label label-left"><?=$row['shop_name']?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">店铺联系人电话</label>
                <label class="layui-form-label label-left"><?=$row['shop_phone']?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">提现金额</label>
                <label class="layui-form-label label-left"><?=$row['withdraw_money']?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">手续费</label>
                <label class="layui-form-label label-left"><?=$row['service_money']?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">原有余额</label>
                <label class="layui-form-label label-left"><?=$row['before_money']?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">提现后余额</label>
                <label class="layui-form-label label-left"><?=$row['after_money']?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">提现申请时间</label>
                <label class="layui-form-label label-left"><?=($row['create_time']) ? date('Y-m-d H:i:s',$row['create_time']) : ' '?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">审核反馈时间</label>
                <label class="layui-form-label label-left"><?= ($row['examine_time']) ? date('Y-m-d H:i:s',$row['examine_time']) : ' '?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">完成时间</label>
                <label class="layui-form-label label-left"><?= ($row['complete_time']) ? date('Y-m-d H:i:s',$row['complete_time']) : ' ' ?></label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">审核结果</label>
                <label class="layui-form-label label-left"><?= CommonService::getWithdrawStatus($row['withdraw_status'])?></label>
            </div>
            <div class="layui-form-item">
                <?php if($row['withdraw_status'] ==0 ):?>
                    <a class="layui-btn agree" status='2' id="<?= $row['id']?>" >通过</a>
                    <a class="layui-btn layui-btn-danger disagree" status='1' id="<?= $row['id']?>" >未通过</a>
                <?php endif;?>
                <?php if($row['withdraw_status'] ==2 ):?>
                    <a class="layui-btn layui-btn-normal payMoney" id="<?= $row['id']?>">提现</a>
                <?php endif;?>    
            <a href="<?=GlobalUrlService::buildAdminUrl('withdraw/index')?>" class="layui-btn layui-btn-primary">返回</a>
            </div>
        </div>
    </div>
</form>

<style>
    .layui-form-label{width:140px;}
    .label-left{text-align:left;margin-left:50px;}
</style>